参数的传递


#include<stdio.h>
void swap(int x, int y)
{
	int t;
	t = x;
	x = y;
	y = t;
	printf("x=%d,y=%d\n",x,y);
}
void main()
{
	int a, b;
	printf("请输入ab:");
	scanf("%d%d",&a,&b);
	swap(a,b);
	printf("a=%d,b=%d\n",a,b);

}